home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat3 / Tcl / error.z / error
Encoding:
Text File  |  2002-10-03  |  3.2 KB  |  67 lines

  1.  
  2.  
  3.  
  4. eeeerrrrrrrroooorrrr((((3333TTTTccccllll))))                                                        eeeerrrrrrrroooorrrr((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      error - Generate an error
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      eeeerrrrrrrroooorrrr _m_e_s_s_a_g_e ?_i_n_f_o? ?_c_o_d_e?
  13.  
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      Returns a TCL_ERROR code, which causes command interpretation to be
  17.      unwound.  _M_e_s_s_a_g_e is a string that is returned to the application to
  18.      indicate what went wrong.
  19.  
  20.      If the _i_n_f_o argument is provided and is non-empty, it is used to
  21.      initialize the global variable eeeerrrrrrrroooorrrrIIIInnnnffffoooo.  eeeerrrrrrrroooorrrrIIIInnnnffffoooo is used to
  22.      accumulate a stack trace of what was in progress when an error occurred;
  23.      as nested commands unwind, the Tcl interpreter adds information to
  24.      eeeerrrrrrrroooorrrrIIIInnnnffffoooo.  If the _i_n_f_o argument is present, it is used to initialize
  25.      eeeerrrrrrrroooorrrrIIIInnnnffffoooo and the first increment of unwind information will not be added
  26.      by the Tcl interpreter.  In other words, the command containing the eeeerrrrrrrroooorrrr
  27.      command will not appear in eeeerrrrrrrroooorrrrIIIInnnnffffoooo; in its place will be _i_n_f_o.  This
  28.      feature is most useful in conjunction with the ccccaaaattttcccchhhh command:  if a
  29.      caught error cannot be handled successfully, _i_n_f_o can be used to return a
  30.      stack trace reflecting the original point of occurrence of the error:
  31.  
  32.           ccccaaaattttcccchhhh {{{{............}}}} eeeerrrrrrrrMMMMssssgggg
  33.           sssseeeetttt ssssaaaavvvveeeeddddIIIInnnnffffoooo $$$$eeeerrrrrrrroooorrrrIIIInnnnffffoooo
  34.           ............
  35.           eeeerrrrrrrroooorrrr $$$$eeeerrrrrrrrMMMMssssgggg $$$$ssssaaaavvvveeeeddddIIIInnnnffffoooo
  36.  
  37.  
  38.      If the _c_o_d_e argument is present, then its value is stored in the
  39.      eeeerrrrrrrroooorrrrCCCCooooddddeeee global variable.  This variable is intended to hold a machine-
  40.      readable description of the error in cases where such information is
  41.      available; see the ttttccccllllvvvvaaaarrrrssss manual page for information on the proper
  42.      format for the variable.  If the _c_o_d_e argument is not present, then
  43.      eeeerrrrrrrroooorrrrCCCCooooddddeeee is automatically reset to ``NONE'' by the Tcl interpreter as
  44.      part of processing the error generated by the command.
  45.  
  46.  
  47. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  48.      error, errorCode, errorInfo
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.